package com.woniu.order.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.woniu.order.entity.dto.QueryServiceOrderDto;
import com.woniu.order.entity.vo.QueryServiceOrderVo;
import com.woniu.order.entity.vo.StatisticsOrderInfoVo;
import com.woniu.order.pojo.Order;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 订单表 Mapper 接口
 * </p>
 *
 * @author LiFangyu
 * @since 2023-02-15
 */
public interface OrderMapper extends BaseMapper<Order> {

    IPage<QueryServiceOrderVo> selectPageServiceOrderVo(IPage<QueryServiceOrderVo> page,@Param("queryServiceOrderDto") QueryServiceOrderDto queryServiceOrderDto);

    @Select("select * from t_order where shop_id = #{shopId} and no = #{no} and is_deleted = '0'")
    Order shopQueryOrder(@Param("shopId") String shopId,@Param("no") String no);

    IPage<StatisticsOrderInfoVo> queryServiceStatistics(IPage<StatisticsOrderInfoVo> page,@Param("queryServiceOrderDto") QueryServiceOrderDto queryServiceOrderDto);
}
